package com.booktrade.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 购物车表，存储用户购物车中添加的书籍信息
 * </p>
 *
 */
@Getter
@Setter
public class Cart implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 购物车ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户ID，关联到用户表
     */
    private Integer userId;

    /**
     * 书籍ID，关联到书籍表
     */
    private Integer bookId;

    /**
     * 书籍数量
     */
    private Integer quantity;

    /**
     * 添加至购物车的时间
     */
    private LocalDateTime createdAt;
}
